﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using JiraGenCommon;

namespace JiraGenerator
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Dispose();
            Application.Exit();
        }

        private void preferencesToolStripMenuItem_Click(object sender, EventArgs e)
        {

            var prefForm = new PreferencesForm {MdiParent = this};
            prefForm.Show();
        }

        private void jiraGeneratorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var jiraGeneratorFrom = new JiraGenerator {MdiParent = this};
            jiraGeneratorFrom.Show();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            GlobalVariables.Current.JiraSoapServiceUrl = ConfigurationSettings.AppSettings["JiraSoapServiceUrl"];
            GlobalVariables.Current.JiraDefaultUser = ConfigurationSettings.AppSettings["default_jira_user"];
        }
    }
}
